Lee Johnson [71310,405] [Downloaded from Compuserve]
October 8, 1986.
(16-colour PCjr patch corrected November 3, 1986.)
Introduction
------------
Although the label on the Starflight package reads "IBM AT, XT, PC, TANDY
1000, 1200, 3000 and all 100% IBM compatibles", Starflight does not run
correctly on the IBM PCjr. Fear not, for you CAN run Starflight on your
PCjr, if you have enough memory. And you can do it in vibrant colour, on
an RGB display!
Memory requirements
-------------------
Starflight requires a minimum of 256K on a "regular" PC. Because of the
added RAM overhead for PCjr video buffers, etc., you will probably need a
minimum of 320K to run Starflight on a PCjr. Be sure to configure your DOS
boot disk to use the extra memory. For IBM PCjr memory expansion sidecars,
this means including the line
DEVICE=PCJRMEM.COM
as the first line of the CONFIG.SYS file on your DOS boot disk. If you
have a large amount of memory (e.g., 640K), you may want to force
everything to run in expansion memory, for added speed. For IBM PCjr
memory expansion, this would be done by including
DEVICE=PCJRMEM.COM /C
as the first line of the CONFIG.SYS file.
Video problems
--------------
Starflight does not set up the video chips properly for the PCjr. The
problem manifests itself as a wild scattering of lines and pixels on the
display, giving the appearance of a TV set with horizontal hold problems.
To fix this problem, we must make a small modification to the Starflight
program. To perform the modification, you will need:
Your original (legitimate) Starflight diskettes
2 blank diskettes (3 if you want to back up the patch)
The DEBUG program (which comes with DOS).
1. Using DISKCOPY, copy the original Starflight disks that came with your
package onto the two blank ones. Put your originals away.
2. Insert the disk containing DEBUG, type "debug", and press the Enter
key. DEBUG should respond with a hyphen, '-'.
3. Insert the copy of the Starflight A disk. Enter the following two
lines, pressing Enter after each:
n starflt.com
l
After a few moments of disk access, a hyphen prompt should appear.
4. We now must verify that we are patching the correct part of the
program. For now we must assume that all Starflight disks shipped by EA
for IBM systems have been the same. [Binary's Note: To date they have all been the same. Any future releases will include compatibility with EGA and JR, obviating this patch.]
If you do not get these results, go back to step 6 and try again. Most
likely one of the values was entered incorrectly. If your results agree
with the text shown here, go to step 7.
7. We now have to write the patched file back to disk. Type "w" and press
the Enter key.DEBUG should respond:
Writing D3B6 bytes
8. Type "q" and press the Enter key to leave DEBUG.
You now have a version of Starflight that will run on the PCjr, without the
video problems. At this point, you might wish to back up the patched A
disk and put it away with your originals, so that you won't have to repeat
this patch procedure the next time you want to start a new game; In this
case, all you would have to do is DISKCOPY your patched A disk and original
B disk to the disks you are using for the new game.
Using your patched copy of Starflight
-------------------------------------
After booting your PCjr to get the expansion memory, enter the command
mode co80
from your DOS disk. This is not ABSOLUTELY necessary, but without it you
will not see the first prompt asking you to insert the disk with STARB.COM
on it.
Now start the game by entering
starflt
When you get to the screen asking you your display type, the option you
select will depend on whether you have applied the old (4-colour) patch,
or the new PCjr 16-colour patch.
If you are running on a PCjr and have applied the 16-colour patch, select '3'
(Composite monitor or color TV). This will produce correct output on both
composite _and_ RGB displays. Do not select '2' (RGB), as this will cause
Starflight to use the colours incorrectly. (RGB mode uses different colours
in some places.)
If you are running with the old patch, you may select '1', '2', or '3'.
NEVER select '4' (Hercules monochrome adapter); the program will die
a graceless death. You cannot use the Hercules card or IBM Monochrome Display
with either of the patches given here.
- Option 1 (Black and white) will produce a black-and-white picture on
a TV or composite colour monitor. Note that option 1 will produce a
colour picture on the PCjr Color Display, which doesn't pay attention
to the colour burst signal and always assumes it's there.
- Option 2 will produce colour output on an RGB display, using the
standard cyan-magenta-white-black palette.
- Option 3 is for use with colour composite monitors or colour TVs;
however, if you have one of these, you are probably better off not
patching your program at all, as "regular" PCs should generate
correct output. (If you have a PCjr and a composite monitor, you
should apply the 16-colour patch.) "Regular" PC owners should only
apply the old patch if they want to take advantage of graphics dumps
(see instructions for old patch, above).
Notes
-----
In the end, I was amazed at how easy the 16-colour patch for the PCjr
turned out to be. For those of you who want to know, the patch uses a
graphics mode peculiar to the PCjr, the so-called "lo-res" 16-colour
160 x 200 mode. The lo-res mode stores two double-width pixels side-by-side
in a single byte, like so:
+--+--+--+--+--+--+--+--+
| | |
+--+--+--+--+--+--+--+--+
Four bits per pixel allows 16 different values to be stored there; this
allows 16 different colours.
Starflight, in its RGB mode, uses the 4-colour 320 x 200 graphics mode
("medium-res"). Four-colour medium-res mode stores four pixels per byte,
like this:
+--+--+--+--+--+--+--+--+
| | | | |
+--+--+--+--+--+--+--+--+
Two bits per pixel allows 4 different values, giving four colours.
Those of you playing Starflight in the four-colour mode will notice that
Starflight "doubles up" its pixels, representing one colour (for example)
by a white pixel paired with a magenta pixel. Nearly ALL of the graphics
(except perhaps the title screens) are done this way. Doubling up the
pixels effectively gives 4 bits per wide pixel. This is done to fake out
the composite output into producting 16 colour values.Aha! I thought.
Why not just turn on the lo-res mode, and let these 4-bit groups be
interpreted as 16 different colours in RGB? So that's what I did. The
only remaining thing to do was to rearrange the colour settings to agree
with what the composite output would produce; in fact, most of the patch
does nothing but set the colours up properly.
Acknowledgments
---------------
Thanks go to Alan Ford [73317,1426], who brought the graphics dump use of
the old patch to my attention.A big thank you to Rod McConnell, one of
Starflight's co-authors, who put up with my pestering and provided me with
the "official" set of colour values to use in the PCjr 16-colour patch.
And of course a nod to the various brave souls who tried the "old" patch on
their EGA cards and discovered that--it worked!
Feedback
--------
Please send any questions or correspondence to Lee Johnson, [71310,405].
[Binary Note:That's if you're on Compuserve. On GEnie you can leave notes in the IBM roundtable, Category 7 (Games) Topic 27 (Starflight) or send mail to R.GONSALVES ( Bob Gonsalves, Binary Systems)]